package com.mnsq.common.bean.entity.subject;

import com.mnsq.common.bean.enums.SubjectType;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * @author 周俭
 */
@Data
@Accessors(chain = true)
@Entity
@Table(name = "user_collect_info", indexes = {@Index(name = "unique_sign", columnList = "resource_unique,user_id", unique = true)})
public class UserCollect extends UserCareInfo {
    private static final long serialVersionUID = -7344905976961860869L;
    /**
     * 收藏内容的类型
     *
     * @see SubjectType ，0-N
     */
    @Column(name = "type", columnDefinition = "int(3) not null default 0 comment '收藏类型，默认0'")
    private Integer type;
}
